//===============================================================================
// Microsoft patterns & practices Enterprise Library Contribution
// Query Application Block
//===============================================================================

using System;

namespace EntLibContrib.Query.Instrumentation
{
	/// <summary>
	/// Provides data for the <see cref="QueryInstrumentationProvider.QueryRead"/> event.
	/// </summary>
	public class QueryReadEventArgs : EventArgs
	{
		#region Fields
		private QueryType queryType;
		private long readCount;
		#endregion

		#region Properties
		/// <summary>
		/// Gets the type of the query.
		/// </summary>
		/// <value>The type of the query.</value>
		public QueryType QueryType
		{
			get { return queryType; }
		}

		/// <summary>
		/// Gets the number of records returned from the read action.
		/// </summary>
		/// <value>The read count.</value>
		public long ReadCount
		{
			get { return readCount; }
		}
		#endregion

		#region Construction
		/// <summary>
		/// Initializes a new instance of the <see cref="QueryReadEventArgs"/> class.
		/// </summary>
		/// <param name="queryType">Type of the query.</param>
		/// <param name="readCount">The read count.</param>
		public QueryReadEventArgs(QueryType queryType, long readCount)
		{
			this.queryType = queryType;
			this.readCount = readCount;
		}
		#endregion
	}
}